﻿using ConfExpert.Forms.Base;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Extensions;

namespace ConfExpert.Forms.IT
{
    public partial class CihazTipi : XForm
    {
        public CihazTipi()
        {
            InitializeComponent();
        }

        private void CihazTipi_Load(object sender, EventArgs e)
        {
            gvCihazTipi.Init("GetCihazTipiName");
            gvCihazTipi.OptionsView.NewItemRowPosition = DevExpress.XtraGrid.Views.Grid.NewItemRowPosition.Bottom;
            gvCihazTipi.MakeColumnInvisible("InsertedOn");
            gvCihazTipi.BestFitColumns();

            btnKaydet.ItemClick += btnKaydet_ItemClick;
        }

        void btnKaydet_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            gvCihazTipi.EndEdit();
            gvCihazTipi.Update("","IT_CihazTipi");
            gvCihazTipi.VeriyiGuncelle("GetCihazTipiName");
        }
    }
}
